package operation.impl;

import book.BookList;
import operation.IOperation;

public class RemoveOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("请输入要下架的书籍名称:");
        String bookName = scanner.next();
        if (bookList.isContains(bookName)) {
            bookList.removeBook(bookName);
            System.out.println("下架成功!");
        }else {
            System.err.println("图书馆不存在该书籍!");
        }
    }
}
